package material.command.receiver_命令接收者;

public class Light {
    /*灯的位置：比如卧室的灯，客厅的灯*/
    private String location;

    public Light(String location) {
        this.location = location;
    }

    public void on() {
        System.out.println(location + " Light is on");
    }

    public void off() {
        System.out.println(location + " Light is off");
    }
}
